package com.example.weddingapp.fragment;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.lifecycle.AndroidViewModel;

import com.example.weddingapp.R;
import com.example.weddingapp.adapter.MyFragmentPagerAdapter;
import com.example.weddingapp.base.BaseFragment;
import com.example.weddingapp.databinding.FragmentActivityBinding;

/**
 * @date 2020/5/7 9:11
 * @desc 活动
 */
public class ActivityFragment extends BaseFragment<AndroidViewModel, FragmentActivityBinding> {

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        MyFragmentPagerAdapter myAdapter = new MyFragmentPagerAdapter(getChildFragmentManager(), FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
        bindingView.viewPager.setAdapter(myAdapter);
        myAdapter.notifyDataSetChanged();
        bindingView.tabType.setupWithViewPager(bindingView.viewPager);
        showContentView();

    }

    @Override
    public int setContent() {
        return R.layout.fragment_activity;
    }


    @Override
    protected void loadData() {
        super.loadData();
    }


}